package com.ump.service;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import org.springframework.stereotype.Service;

import com.ump.domain.AppUser;

@Service
public class AppUserService {

	public AppUser findByName(String userName) {
		Map<String,AppUser> users = new HashMap<String,AppUser>();
		AppUser user1 = new AppUser();
		user1.setUserName("bill");
		user1.setPassword("abc123");
		user1.setUserType("1");
		user1.setUuid(UUID.randomUUID().toString());
		users.put("bill", user1);
		
		AppUser user2 = new AppUser();
		user2.setUserName("bob");
		user2.setPassword("abc123");
		user2.setUserType("1");
		user2.setUuid(UUID.randomUUID().toString());
		users.put("bob", user2);
		return users.get(userName);
	}
	
}
